import '@/assets/css/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/assets/icon/iconfont.css'
import Dialog from '@/components/Dialog.vue'
import Cover from '@/components/Cover.vue'
import Avatar from '@/components/Avatar.vue'
import VideoItem from '@/components/VideoItem.vue'
import DataLoadMoreList from '@/components/DataLoadMoreList.vue'
import NoData from '@/components/NoData.vue'
import Collapse from '@/components/Collapse.vue'
import DataList from '@/components/DataList.vue'
import TableList from '@/components/TableList.vue'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(ElementPlus)
/**
 * 注：
 * 在这里注册全局组件必须要和对应的文件名字一致才可以如果不一致
 * 自动导入组件就无法在components.d.ts中导入该组件类型
 *
 */
app.component('commonDialog', Dialog)
app.component('Cover', Cover)
app.component('Avatar', Avatar)
app.component('VideoItem', VideoItem)
app.component('DataLoadMoreList', DataLoadMoreList)
app.component('NoData', NoData)
app.component('Collapse', Collapse)
app.component('DataList', DataList)
app.component('TableList', TableList)
app.mount('#app')
